public class Main {
    public static void main(String[] args) {
        Chessman chessman=new Chessman("Queen",4,7);
        MementoCaretaker mementoCaretaker=new MementoCaretaker();
        mementoCaretaker.setMemento(chessman.save());
        chessman.setX(6);
        chessman.setY(9);
        chessman.PRI();
        System.out.println("撤销后");
        chessman.restore(mementoCaretaker.getMemento());
        chessman.PRI();
    }
}